import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/4 10:19
 * @description:
 */
public class CharCord {

  public static void main(String[] args) throws IOException {
    InputStreamReader isr=new InputStreamReader
        (new FileInputStream("d:\\a.txt"),"gbk");
    OutputStreamWriter osw=new
        OutputStreamWriter(new FileOutputStream("pan.txt"),"utf-8");
    BufferedReader br=new BufferedReader(isr);
    BufferedWriter bw=new BufferedWriter(osw);
    String line=null;
    while ((line=br.readLine())!=null){
      bw.write(line);
      bw.newLine();
    }
    br.close();
    bw.close();
   isr.close();
   osw.close();
  }

}
